class animal:
    def food(self):
        pass

    def eat(self):
        self.food()


class dog(animal):
    def food(self):
        print("吃肉")


class cat(animal):
    def food(self):
        print("鱼肉")


d =dog()
d.eat()

c =cat()
c.eat()